export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  dialogDirection: "rtl",
  searchMenuSpan: 6,
  column: [
    {
      label: "外封图标",
      prop: "img",
      type: "upload",
      action: "/fastfile/upload/szgk-1256675456",
      listType: "picture-img",
      dataType: "string",
      limit: 1,
      propsHttp: {
        res: "data",
        url: "kpath",
      },
      span: 24,
      rules: [
        {
          required: true,
          message: "请选择外封图标",
          trigger: "change",
        },
      ],
    },
    {
      label: "图片集",
      prop: "resources",
      type: "upload",
      action: "/fastfile/upload/szgk-1256675456",
      listType: "picture-card",
      dataType: "string",
      limit: 7,
      propsHttp: {
        res: "data",
        url: "kpath",
      },
      span: 24,
      rules: [
        {
          required: true,
          message: "请选择图片集",
          trigger: "change",
        },
      ],
    },
    {
      type: "input",
      label: "名称",
      prop: "name",
      search: true,
      rules: [
        {
          required: true,
          message: "请输入名称",
          trigger: "blur",
        },
      ],
    },
    {
      type: "input",
      label: "简介",
      prop: "description",
      component: "avueUeditor",
      slot: true,
      hide: true,
      options: {
        action: "/fastfile/upload/szgk-1256675456",
        props: {
          res: "data", // 解析文件上传后的respose.JSON
          url: "kpath", // 解析responseJSON==> data.fileUrl
        },
      },
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入简介",
          trigger: "blur",
        },
      ],
    },

    {
      type: "input",
      label: "内容",
      prop: "enabled",
      component: "avueUeditor",
      slot: true,
      hide: true,
      options: {
        action: "/fastfile/upload/szgk-1256675456",
        props: {
          res: "data", // 解析文件上传后的respose.JSON
          url: "kpath", // 解析responseJSON==> data.fileUrl
        },
      },
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入内容",
          trigger: "blur",
        },
      ],
    },
    {
      type: "map",
      label: "地址",
      prop: "address",
      dataType: "string",
      formatter: (data) => {
        if (data.address) {
          const str = data.address.split(",");
          return str[2];
        }
      },
      rules: [
        {
          required: true,
          message: "请选择地址",
          trigger: "change",
        },
      ],
    },
    {
      type: "input",
      label: "电话",
      prop: "phone",
    },
    {
      type: "input",
      label: "排序号",
      prop: "sort",
    },
  ],
};
